<?php

$neewee = get_option('neewee');

?>
	<div id="sidebar" class="span-10 last">
		
		<div class="span-10" id="tabs">
			<ul>
				<?php if($neewee['feedburner_feed_url'] != '') {?><li class="ui-tabs-nav-item rss"><a href="#subscribe-tab"><?php _e('Subscribe', 'NeeWee'); ?></a></li><? } ?>
				<?php if($neewee["featured_category"] > -1) { ?><li class="ui-tabs-nav-item"><a href="#featured-articles"><?php _e('Featured Articles', 'NeeWee'); ?></a></li><?php }?>
				<li class="ui-tabs-nav-item"><a href="#latest-articles"><?php _e('Latest Articles', 'NeeWee'); ?></a></li>
			</ul>

			<?php if($neewee['feedburner_feed_url'] != '') {?>
			<div id="subscribe-tab" class="widget">
				<ul>
					<li><a href="<?php echo($neewee['feedburner_feed_url']); ?>"><?php _e('Subscribe to', 'NeeWee'); ?> <strong><?php bloginfo('name'); ?></strong> <?php _e('via RSS', 'NeeWee'); ?></a></li>
				</ul>
				<?php if($neewee['feedburner_email_id'] != '') { ?>
				<form action="http://www.feedburner.com/fb/a/emailverify" method="post" target="popupwindow" onsubmit="window.open('http://www.feedburner.com/fb/a/emailverifySubmit?feedId=<?php echo($neewee['feedburner_email_id']); ?>', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true">
					<p>
						<?php _e('or via e-mail', 'NeeWee'); ?>: <input type="text" style="width:140px" name="email"/>
						<input type="hidden" value="http://feeds.feedburner.com/~e?ffid=<?php echo($neewee['feedburner_email_id']); ?>" name="url"/>
						<input type="hidden" value="<?php bloginfo('name'); ?>" name="title"/>
						<input type="hidden" name="loc" value="en_US"/>
						<input type="submit" value="<?php _e('Subscribe', 'NeeWee'); ?>" />
					</p>
						<?php _e('Delivered by'); ?> <a href="http://www.feedburner.com" target="_blank">FeedBurner</a>
				</form>
				<?php } ?>
			</div>
			<?php } ?>
			<?php if($neewee["featured_category"] > -1) { ?>
			<div id="featured-articles" class="widget">
				<?php query_posts('cat=' . $neewee["featured_category"] . '&showposts=10'); ?>
				<ul>
				<?php while (have_posts()) : the_post(); ?>
				<li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
				<?php endwhile;?>
				</ul>
			</div>
			<?php } ?>
			<div id="latest-articles" class="widget">
				<?php query_posts('showposts=10'); ?>
				<ul>
				<?php while (have_posts()) : the_post(); ?>
				<li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
				<?php endwhile;?>
				</ul>
			</div>
			<script type="text/javascript" charset="utf-8">
				$("#tabs > ul").tabs();
			</script>
			
		</div>
		<div class="column span-5 append-1">
			<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar1') ) : ?>
				<div class="widget">
					<h4><?php _e('Categories', 'NeeWee'); ?></h4>
					<ul>
						<?php wp_list_categories('title_li=');?>
					</ul>
				</div>
				<div class="widget">
					<h4><?php _e('Blogroll', 'NeeWee'); ?></h4>
					<ul>
						<?php wp_list_bookmarks('title_li=&categorize=0'); ?>
					</ul>
				</div>
			<?php endif; ?>
		</div>
		<div class="column span-4 last">
		    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar2') ) : ?>
				<div class="widget">
					<h4><?php _e('Pages', 'NeeWee'); ?></h4>
					<ul>
					<?php wp_list_pages('title_li='); ?>
					</ul>
				</div>
				<div class="widget">
					<h4><?php _e('Archives', 'NeeWee'); ?></h4>
					<ul>
						<?php wp_get_archives('type=monthly&show_post_count=true'); ?>
					</ul>
				</div>
			<?php endif; ?>
		</div>
	</div>

